//
//  DetailMessageVC.m
//  QoilPublic
//
//  Created by SunChao on 2017/12/9.
//  Copyright © 2017年 杨凯. All rights reserved.
//

#import "DetailMessageVC.h"
#import "CustomTableView.h"
@interface DetailMessageVC ()
@property (nonatomic,strong)UITableView *customTbView;
@end

@implementation DetailMessageVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"订单状态图";
    [self.view addSubview:self.customTbView];
    [self requestDataIsLook];
}
-(UITableView *)customTbView{
    if (!_customTbView) {
        _customTbView  = [[CustomTableView alloc]initWithFrame:self.view.frame orderId:_model.orderId orderAddress:_model.adress statusTime:_model.stateTime stateText:_model.stateText purId:_model.purId integral:_model.integral];
    }
    return _customTbView;
    
}
//标记为已读
- (void)requestDataIsLook{
    
    NSString *url = [QParamService urlWithAction:@"addPushIsLook"];
    NSDictionary *param = [QParamService addPushIsLookWithPurId:_model.purId];
    [[QHttpManager sharedManager] POST:url parameterMD5:param completion:^(NSData *data, NSDictionary *dict, NSError *error) {
        if(error){
            return ;
        }
        QBaseModel *basModel = [QBaseModel objectFromDict:dict];
        if([basModel.result isEqualToString:@"success"]){
            CLog(@"标记为已读");
        }else{
        }
    }];
    
}

@end
